HTMLify

index.html
Views: 72 | Author: cody
<!DOCTYPE html>
<html>

<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Processing Button MI</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen' href='style.css'>
</head>

<body>
    <button class="button">
        <span>SUBMIT</span>
        <svg viewBox="0 0 15 13">
            <polyline points="2 6.5 6 10.5 13 2.5"></polyline>
        </svg>
    </button>

    <script>
        document.querySelectorAll('.button').forEach(button => {
            button.addEventListener('click', e => {
                button.classList.add('processing');
                e.preventDefault();
            });
        });
    </script>
</body>

</html>

Comments